﻿@model BugTracker.Models.Issue 
@{
    ViewBag.Title = "CreateNewIssue";
    Layout = "~/Views/Shared/_LayoutQA.cshtml";
}


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>

	<script type='text/javascript'>
	    $(document).ready(function () {
	        $(".datePicker").datepicker({
	            showAnim: 'slideDown',
	            currentText: 'Now',

	            changeMonth: true,
	            changeYear: true,
	            showButtonPanel: true,
	            yearRange: '1900:2030'

	        });
	    });

</script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

<fieldset>

<br />
   <div class="display-label"><b>Project Name:</b></div>
           
        @Html.DropDownListFor(model => model.project_idFK,
         new SelectList(ViewData["ProjectName"] as System.Collections.IEnumerable,
                 "project_idPK", "project_name"))
          
    <br /> 
    <br /> 
    
    <div class="display-label"><b>Issue Name:</b></div>
    <div class="editor-field">
         @Html.EditorFor(model => model.issue_name)
         @Html.ValidationMessageFor(model => model.issue_name)
    </div>

     <br />
     <div class="display-label"><b>Summary:</b></div>
     <div class="editor-field">
            @Html.TextAreaFor(model => model.issue_summary, new { @style = "resize: none;", @cols = 50, @rows = 10 })
            @Html.ValidationMessageFor(model => model.issue_summary)
      </div>

      <br />
      <div class="display-label"><b>Traget Resolution Date:</b></div>
      <div class="datefield">
            @Html.EditorFor(model => model.target_resolutiondate)
            @Html.ValidationMessageFor(model => model.target_resolutiondate)
      </div>

      <br />
      <div class="display-label"><b>Actual Resolution Date:</b></div>
      <div class="datefield">
            @Html.EditorFor(model => model.actual_resolutiondate)
            @Html.ValidationMessageFor(model => model.actual_resolutiondate)
      </div>

      <br />
      <div class="display-label"><b>Priority:</b></div>
            @Html.RadioButtonFor(model => model.priority, "High", new { Checked = "checked" }) High
            @Html.RadioButtonFor(model => model.priority, "Low") Low
        
      <br />
      <br />
      <div class="display-label"><b>Status:</b></div>
           @Html.RadioButtonFor(model => model.status, "On-going", new { Checked = "checked" }) On-going
           @Html.RadioButtonFor(model => model.status, "Resolved") Resolved
     
      <br />
      <br />
      <p>
         <input type="submit" value="Create Issue" />
      </p>
     
      <div>
            @Html.ActionLink("Back to Issues", "Issue")
      </div>
      <br />
      <br />
</fieldset> 
}